<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" type="text/css" th:href="@{/css/zTreeStyle/zTreeStyle.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/layui/css/layui.css}">
	<link rel="stylesheet" type="text/css" th:href="@{/css/index.css}">
</head>
<body class="layui-tab-content">
<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class=" layui-col-sm12 layui-col-md3 layui-col-lg2">
			<div class="layui-card">
				<div class="layui-card-body mini-bar">
					<div class="ztree" id="showTree"></div>
				</div>
			</div>
		</div>
		<div class=" layui-col-sm12 layui-col-md9 layui-col-lg10">
			<div class="layui-card">
				<div class="layui-card-body">
					<div class="layui-form toolbar" id="queryTools">
						<div class="layui-form-item">
							<label class="layui-form-label">菜单名称:</label>
							<div class="layui-input-inline">
								<input id="menuName" class="layui-input" type="text" placeholder="菜单名称"/>
							</div>
							<label class="layui-form-label">层级:</label>
							<div class="layui-input-inline">
								<input id="level" class="layui-input" type="text" placeholder="层级"/>
							</div>
							<div class="layui-inline">
								<button id="btnSearch" class="layui-btn icon-btn">查询</button>
								<button class="layui-btn" id="resetSearch">重置</button>
								<button id="btnAdd" class="layui-btn icon-btn">新增</button>
								<!--<button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon">&#xe67d;</i>导出</button>-->
							</div>
						</div>
					</div>
					<table class="layui-table" id="menuTable" lay-filter="menuTable"></table>
				</div>
			</div>
		</div>
	</div>
</div>
<!--列操作-->
<script type="text/html" id="barDemo">
	{{# if(d.parentCode != 0 ){ }}
		<a class="layui-btn layui-btn-xs" lay-event="edit">修改</a>
		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
	{{# }  }}
</script>
<form id="menuForm" class="layui-form" lay-filter="menuForm" style="display:none;padding-top:10px">
	<input type="hidden" name="menuId"/>
	<div class="layui-form-item">
		<label class="layui-form-label"><i class="layui-tip-required">*</i>菜单编号</label>
		<div class="layui-input-inline">
			<input type="text" name="menuCode" lay-verify="required" autocomplete="off"
				   class="layui-input layui-form-danger">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><i class="layui-tip-required">*</i>菜单名称</label>
		<div class="layui-input-inline">
			<input type="text" name="menuName" lay-verify="required" autocomplete="off"
				   class="layui-input layui-form-danger">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><i class="layui-tip-required">*</i>请求地址</label>
		<div class="layui-input-inline">
			<input type="text" name="menuLink" lay-verify="menuLink" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><i class="layui-tip-required">*</i>菜单类型</label>
		<div class="layui-input-block">
			<input type="radio" name="menuType" value="1" title="菜单">
			<input type="radio" name="menuType" value="2" title="动作">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><i class="layui-tip-required">*</i>状态</label>
		<div class="layui-input-block">
			<input type="radio" name="status" value="1" title="启用">
			<input type="radio" name="status" value="2" title="禁用">
		</div>
	</div>
	<div id="treeItem" class="layui-form-item">
		<label class="layui-form-label"><i class="layui-tip-required">*</i>所属父菜单</label>
		<div class="layui-input-block">
			<ul id="menuTree" class="ztree"></ul>
		</div>
	</div>
	<div class="layui-form-item layui-hide">
		<button id="saveMenu" class="layui-btn" lay-submit lay-filter="saveMenu">保存</button>
	</div>
</form>
<script type="text/javascript" th:src="@{/js/plugins/jquery-1.11.3.min.js}"></script>
<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/js/plugins/jquery.ztree.all.min.js}"></script>
<script type="text/javascript" th:src="@{/js/sys/menuManage/tree.js}"></script>
</body>
</html>